1. Field of the Invention
The present invention relates to a video decoder implementation technique based on moving image compression and decompression schemes of various international standards, and particularly to a moving image decoding apparatus and a moving image decoding method with a function to improve robustness against bit errors occurring in a bit stream.
2. Description of Related Art
Conventional moving image coding schemes such as MPEG-2 Video (ISO/IEC 13818-2) are designed such that when they detect an error while decoding coded data, they can return (resynchronize) to normal decoding on a slice by slice basis, each slice consisting of a plurality of macroblocks (each macroblock including a luminance signal consisting of 16xc3x9716 pixels and chrominance signal consisting of 8xc3x978 pixels)
The initial macroblock of each slice can identify its absolute position in a picture by itself. Thus, detecting a start code (slice start code) indicating the initial position of the slice in a bit stream (coded data) enables decoding to be restarted from the right position in the picture.
To determine the position in the picture, information is needed that represents the position of the slice in the picture (lower eight bits of the slice start code). If any bit error takes place in the bit field, the slice cannot be displayed in a right place. This can be decided by detecting discontinuity from the previous slice.
However, since the position of the slice in the picture is represented by the eight bits of a fixed length, it is very difficult to recognize any bit error as an error. In addition, because the number of macroblocks per slice can be identified for the first time by learning the position of the initial macroblock in a new slice detected, it is not easy when a discontinuity is detected to uniquely decide as to whether the discontinuity arises from continuing decoding based on erroneous synchronization in the previous slice, or from erroneously identifying the position of the initial macroblock in the slice in the picture.
Accordingly, it is unavoidable to continue the decoding on the assumption that the position of the initial macroblock in the newly detected slice is correct. This can result in sharp degradation in the picture because of the misidentification of the position of the initial macroblock in the slice.
With the foregoing structure, the conventional moving image decoding method has a problem of discarding unimpaired macroblocks because when the discontinuity of the coded data is detected, it is unavoidable to set a resynchronization point at the position of the initial macroblock in the newly detected slice regardless of the cause of the discontinuity.
The present invention is implemented to solve the foregoing problem. It is therefore an object of the present invention to provide a moving image decoding apparatus and a moving image decoding method capable of minimizing image degradation due to errors by properly setting the resynchronization point in accordance with the cause of the discontinuity.
Another object of the present invention is to provide a moving image decoding apparatus and a moving image decoding method capable of properly concealing the data of lost macroblocks because of errors.
A moving image decoding apparatus according to the present invention comprises: resynchronization means for setting, if decoding means completes decoding of coded data without detecting any error in the coded data and if reviewing means detects an occurrence of a discontinuity, a resynchronization point at an initial position of coded data subsequent to the next coded data.
This makes it possible to set a suitable resynchronization point in response to the cause of the occurrence of the discontinuity, and hence offers an advantage of being able to minimize the image degradation due to errors.
A moving image decoding apparatus according to the present invention comprises: resynchronization means for setting, if decoding means completes decoding of coded data without detecting any error in the coded data and if reviewing means detects an occurrence of a discontinuity, a resynchronization point at an initial position of the next coded data estimated by the reviewing means.
This makes it possible to set a suitable resynchronization point in response to the cause of the occurrence of the discontinuity, and hence offers an advantage of being able to minimize the image degradation due to errors.
A moving image decoding apparatus according to the present invention comprises: concealment means for performing, if decoding means detects an error in data multiplexed after a unique word and if reviewing means detects an occurrence of a discontinuity, a concealment processing of the data without using motion vectors obtained from the coded data, and for performing, if the decoding means detects an error in the data multiplexed after the unique word and if the reviewing means does not detect any occurrence of a discontinuity, a concealment processing of the data using the motion vectors obtained from the coded data.
This offers an advantage of being able to carry out suitable concealment of the macroblock data lost by errors.
The reviewing means of the moving image decoding apparatus according to the present invention can identify the occurrence of the discontinuity when a gap is present between the two adjacent coded data.
This offers an advantage of being able to detect the occurrence of the discontinuity easily.
The reviewing means of the moving image decoding apparatus according to the present invention can identify the occurrence of the discontinuity when an overlap is present between the two adjacent coded data.
This offers an advantage of being able to detect the occurrence of the discontinuity easily.
The moving image decoding apparatus according to the present invention can contain motion vectors in the data multiplexed before the unique word.
This offers an advantage of being able to perform concealment processing using the motion vectors even if an error takes place in the data after the unique word.
A moving image decoding method according to the present invention sets, if decoding of coded data is completed without detecting any error in the coded data and if an occurrence of a discontinuity is detected between the coded data and the next coded data, a resynchronization point at an initial position of coded data subsequent to the next coded data.
This makes it possible to set a suitable resynchronization point in response to the cause of the occurrence of the discontinuity, and hence offers an advantage of being able to minimize the image degradation due to errors.
A moving image decoding method according to the present invention sets, if decoding of coded data is completed without detecting any error in the coded data and if an occurrence of a discontinuity is detected between the coded data and the next coded data, a resynchronization point at an initial position of the next coded data estimated.
This makes it possible to set a suitable resynchronization point in response to the cause of the occurrence of the discontinuity, and hence offers an advantage of being able to minimize the image degradation due to errors.
A moving image decoding method according to the present invention performs, if an error is detected in data multiplexed after a unique word and if an occurrence of a discontinuity is detected between the coded data and the next coded data, a concealment processing of the data without using motion vectors obtained from the coded data, and performs, if an error is detected in the data multiplexed after the unique word and if the occurrence of the discontinuity is not detected between the coded data and the next coded data, a concealment processing of the data using the motion vectors obtained from the coded data.
This offers an advantage of being able to carry out suitable concealment of the macroblock data lost by errors.
The moving image decoding method according to the present invention can identify the occurrence of the discontinuity when a gap is present between the two adjacent coded data.
This offers an advantage of being able to detect the occurrence of the discontinuity easily.
The moving image decoding method according to the present invention can identify the occurrence of the discontinuity when an overlap is present between the two adjacent coded data.
This offers an advantage of being able to detect the occurrence of the discontinuity easily.
The moving image decoding method according to the present invention can contain motion vectors in the data multiplexed before the unique word.
This offers an advantage of being able to perform concealment processing using the motion vectors even if an error takes place in the data after the unique word.